#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QMouseEvent>
#include <QPoint>
#include <QStackedWidget>

#include "startsence.h"
#include "playgamesence.h"

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);

    void mousePressEvent(QMouseEvent* event) override;
    void mouseMoveEvent(QMouseEvent* event) override;
    void paintEvent(QPaintEvent* event) override;

    void playGame();
    void exitGameHandle();



    ~Widget();

private:
    Ui::Widget *ui;
    QPoint dragPosition;

    // 场景
    StartSence* startSence;
    PlayGameSence* playGameSence;

    // 场景管理
    QStackedWidget *stackedWidget;

};
#endif // WIDGET_H
